package com.org.manhu.chargehelper.down;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * @文件名：DBOpenHelper.java
 * @包名：com.org.manhu.chargehelper.down
 * @作者：李朋辉 @QQ：892839211
 * @创建时间：2015年2月12日 下午1:01:33
 *
 * @描述：数据库
 */
public class DBOpenHelper extends SQLiteOpenHelper {
	private static final String DBNAME = "down.db";
	private static final int VERSION = 1;

	public DBOpenHelper(Context context) {
		super(context, DBNAME, null, VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE IF NOT EXISTS filedownlog (id integer primary key autoincrement,"
				+ " downpath varchar(100), threadid INTEGER, downlength INTEGER)");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// db.execSQL("DROP TABLE IF EXISTS filedownlog");
		// onCreate(db);
	}
}
